Skip to content

chore(dev): Claude hooks, AGENTS.md, dev-shell search tooling - #59

Open
mfw78 wants to merge 2 commits into
mainfrom
chore/claude-dev-tooling
Open

chore(dev): Claude hooks, AGENTS.md, dev-shell search tooling#59
mfw78 wants to merge 2 commits into
mainfrom
chore/claude-dev-tooling

Conversation

@mfw78

@mfw78 mfw78 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Adds the shared Claude Code tooling and the agent contract this repository was missing. No production code, no CI change.

.claude/ hooks and settings. settings.json wires three hooks copied from an already-tested sibling repo: rustfmt-on-edit.sh formats each edited .rs file with --edition 2024 (verified against [workspace.package] edition in Cargo.toml), content-lint.sh blocks an edit that adds an em-dash to a .rs or .md file, and nextest-on-stop.sh runs cargo nextest run for the crates with uncommitted .rs changes at the end of a turn. Each hook exits early when rustfmt, cargo, or cargo-nextest is missing, so it does nothing outside the Nix dev shell.

AGENTS.md, with CLAUDE.md as a symlink to it. Written in ASD-STE100 Simplified Technical English with one sentence per line. Every claim is grounded in README.md, Cargo.toml, crates/, the justfile, and .github/workflows/ci.yml: the venue-agnostic runtime that ships no venue payload, the extension seam (extensions.toml rows synthesized by nexum-world), the crate layout, edition 2024 with the flake-pinned Rust 1.94.0 toolchain that matches CI, the real just recipes, cargo nextest run plus a separate cargo test --doc, and fmt and clippy as the pre-commit gate. No roadmap or architecture was invented.

flake.nix. Adds ripgrep and ast-grep to the devShell with a short comment. cargo-nextest was already present, and nothing was removed.

.config/nextest.toml. New file with slow-timeout = { period = "60s", terminate-after = 5 }, so a hung test fails by name after five minutes instead of eating the CI job timeout. The justfile and ci.yml are untouched.

.gitignore. .claude/ was ignored wholesale. It is now .claude/* with negations for settings.json and hooks/, and explicit ignores for settings.local.json and worktrees/. Verified with git add -A -n that the shared files stage and the personal ones do not.

Validated locally: jq -e . on the settings, a tomllib parse of the nextest config, nix-instantiate --parse flake.nix, bash -n on each hook, a live check that content-lint.sh blocks an em-dash payload and passes clean text, and an em-dash scan over AGENTS.md that finds nothing.

Closes #58

AI Assistance: Claude Opus used for the hooks wiring, AGENTS.md, and the flake change.

mfw78 added 2 commits July 29, 2026 06:42
Add the shared Claude Code configuration this repo had no equivalent of,
plus the two dev-shell tools the agent workflow depends on.

.claude/settings.json wires three hooks:
- rustfmt-on-edit.sh formats each edited .rs file with edition 2024,
  matching the workspace edition.
- content-lint.sh blocks an edit that adds an em-dash to a .rs or .md
  file, which is the house rule the repo already follows by hand.
- nextest-on-stop.sh runs cargo nextest for the crates with uncommitted
  .rs changes at the end of a turn.

Each hook is a no-op when its tool is missing, so nothing changes outside
the Nix dev shell.

AGENTS.md is the agent contract, and CLAUDE.md is a symlink to it. It is
written in ASD-STE100 Simplified Technical English with one sentence per
line. The content is grounded in README.md, Cargo.toml, the justfile, and
.github/workflows/ci.yml: no new roadmap or architecture claims.

flake.nix gains ripgrep and ast-grep in the devShell. cargo-nextest was
already there. Nothing is removed.

.config/nextest.toml sets a slow-timeout so a hung test fails by name
after five minutes instead of consuming the CI job timeout. The justfile
and the CI workflow are unchanged: they already run cargo nextest run and
a separate cargo test --doc.

.gitignore previously ignored all of .claude/. It now tracks
settings.json and hooks/ while keeping settings.local.json and
worktrees/ out of the repository.

AI Assistance: Claude Opus used for the hooks, AGENTS.md, and flake change
content-lint scanned the whole file, so any edit to a file that already carried
an em-dash was blocked even when the edit added none. That made an existing
README or comment effectively uneditable.

Compare the count against the committed version of the same file and block only
on a net increase. A file that already carries the token stays editable, and
adding one is still blocked.

AI Assistance: Claude Opus used for this fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Claude Code hooks and an AGENTS.md contract

1 participant